<?
if(!defined('_PHP_FILE_')) {
		define('_PHP_FILE_', rtrim($_SERVER["SCRIPT_NAME"],'/'));
}
if(!defined('__ROOT__')) {	
	$_root = dirname(_PHP_FILE_);
	define('__ROOT__',  (($_root=='/' || $_root=='\\')?'':rtrim($_root,'/')));
}
	define('site_domain',$_SERVER['HTTP_HOST']);
	define('site_url','http://'.site_domain.__ROOT__);
	define('site_path',dirname(__FILE__));
	define('CSS_URL',site_url.'/Tpl/public/css');
	define('JS_URL',site_url.'/Tpl/public/js');
	define('IMG_URL',site_url.'/Tpl/public/image');
	define('UPLOAD_URL',site_url.'/data/upload/');
	define('INC_URL',site_url.'/data/include/');
	//echo site_path;
	include "./tp/ThinkPHP.php";
	//print_r(APP_PATH);
?>